one pesky little bug. one month of development. more about SSA form: introductory stuff: - https://en.wikipedia.org/wiki/Static_single-assignment_form - https://blog.yossarian.net/2020/10/23/Understanding-static-single-assignment-forms converting to ssa form: - ssa form: https://www.cs.cornell.edu/courses/cs6120/2022sp/lesson/6/ - dominators: https://www.cs.cornell.edu/courses/cs6120/2022sp/lesson/5/ - and: https://www.cs.rice.edu/~keith/EMBED/dom.pdf converting out of ssa form: - register allocation: http://web.cs.ucla.edu/~palsberg/course/cs132/linearscan.pdf - and: https://link.springer.com/content/pdf/10.1007/3-540-45937-5_17.pdf - phi elimination: http://web.cs.ucla.edu/~palsberg/paper/cc09.pdf - and: https://www.cs.cmu.edu/afs/cs/academic/class/15411-f19/www/lec/22-unssa.pdf implementations: - mine: https://github.com/leddoo/kibi/tree/dd46dbbe8f203091189bb2ba8cff59b64996e856/src/compiler - negate's tb: https://github.com/RealNeGate/Cuik/tree/ef798d820fe5e40e2ca9640463f38d2e106d1a76/tb chapters: 00:00-00:20 - intro 00:20-01:29 - the bug 01:29-03:14 - how python does it 03:14-05:29 - why mine is broken 05:29-08:53 - finding a solution 08:53-10:37 - copy propagation 10:37-12:35 - ssa form 12:35-14:16 - overview of the new compiler